<%@page import="com.wodwl.entity.Post"%>
<%@page import="java.util.List"%>
<%@page import="com.wodwl.entity.Bbs"%>
<%@page import="com.wodwl.entity.Blog"%>
<%@page import="com.wodwl.entity.User"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<%@include file="../templete/header.jsp" %>
</head>
<body >
<%
	pageContext.setAttribute("linkType","3");
%>
<%@include file="../templete/user_info.jsp"  %>

	<%
		//User user = (User) request.getAttribute("user");
		//Blog blog = (Blog) request.getAttribute("blog");
		Bbs bbs = (Bbs) request.getAttribute("bbs");
		List<Post> bbsreplys=(List<Post>)request.getAttribute("bbsreplys");
		String to_user=(String)request.getAttribute("to_user");
	%>
	
			

		<div class="conR">
			<div class="conR-hd">
				<h3><%=bbs.getTitle()%></h3>
			</div>

			<div class="oauth-sum-list">
				<div class="oauth-sum-listinfo">
					<table>
						<tbody>
							<tr>
								<td>
									<p>
										作者：<a href="/user/info_display.do?username=<%=user.getUsername()%>&request_username=<%=bbs.getUsername()%>"><font color="blue"><%=bbs.getUsername()%></font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=bbs.getCreate_time()%>&nbsp;&nbsp;
										<%
											if (bbs.getUsername().equals(user.getUsername())) {
										%>
										<a href="/bbs/bbs_editor1.do?username=<%=user.getUsername()%>&path=<%=bbs.getPath()%>"><font color="green">编辑</font></a>
										<%
											}
										%>

									</p> <br /> <br /><pre> <%=bbs.getContent()%></pre>
								</td>
							</tr>
						</tbody>
					</table>
					<font color="red" size="3">回复</font>
					<hr>
					
					
					
					
					<form action="/bbs/post.do" method="post">
						<input type="hidden"  name="username" value="<%=user.getUsername()%>">
						<input type="hidden"  name="path" value="<%=bbs.getPath()%>">
						<input type="hidden"  name="from_user" value="<%=user.getUsername()%>">
						<input type="hidden"  name="to_user" value="<%=to_user%>">
						
						<table>
							<tr>
								<td><textarea name="content" cols="100" rows="10"></textarea></td>
							</tr>
							<tr>
								<td><input type="submit" value="提交"></td>
							</tr>
						</table>
					</form>
					
					
					
					<table>
						<%
							for(int i=0;i<bbsreplys.size();i++){
										Post reply=bbsreplys.get(i);
						%>
						<tr>
							<td width="100"><img src="../../static/img1.jpg"><br/><%=reply.getFrom_user() %><br/>等级：蚂蚁蛋</td>
							<td colspan="3">
								<%=reply.getContent() %>
							</td>
							<td align="right" width="100">
								<br/><br/><br/><a href="#"><font color="green">顶</font></a>|<a href="/bbs/post_view.do?username=<%=user.getUsername()%>&path=<%=bbs.getPath()%>"><font color="green">回复</font></a>|<a href="#"><font color="green">举报</font></a>
							</td>
						</tr>
						<tr>
							<td colspan="5">
								<hr>
							</td>
						</tr>
						<%} %>
					</table>
					
					
				</div>
			</div>
		</div>

		<jsp:include page="../templete/footer.jsp"></jsp:include>
</body>
</html>